import request from '@/utils/request'

export function getProjectList(data) {
  return request({
    url: '/rangeBuild/project/getProjectList',
    method: 'get',
    params: data
  })
}

export function getProjectInfo(data) {
  return request({
    url: '/rangeBuild/project/getProjectInfo',
    method: 'get',
    params: data
  })
}

export function getProjectComps(data) {
  return request({
    url: '/rangeBuild/project/getProjectComps',
    method: 'get',
    params: data
  })
}

export function getProjectEnvs(data) {
  return request({
    url: '/rangeBuild/project/getProjectEnvs',
    method: 'get',
    params: data
  })
}

export function getCompBranchTagList(data) {
  return request({
    url: '/rangeBuild/project/getCompBranchTagList',
    method: 'post',
    data
  })
}

export function importProjectInfo(data) {
  return request({
    url: '/rangeBuild/project/importProjectInfo',
    method: 'post',
    params: data
  })
}

export function updateEnvList(data) {
  return request({
    url: '/rangeBuild/project/updateEnvList',
    method: 'post',
    data
  })
}

export function updateProjectInfo(data) {
  return request({
    url: '/rangeBuild/project/updateProjectInfo',
    method: 'post',
    data
  })
}

export function reconnectProject(data) {
  return request({
    url: '/rangeBuild/project/reconnectProject',
    method: 'post',
    params: data
  })
}

export function queryProjectBuildProgress(data) {
  return request({
    url: '/rangeBuild/project/queryProjectBuildProgress',
    method: 'get',
    params: data
  })
}

export function fetchCompUpgradeSqlFiles(data) {
  return request({
    url: '/rangeBuild/project/fetchCompUpgradeSqlFiles',
    method: 'get',
    params: data
  })
}

export function getInnerOnePackProjectId() {
  return request({
    url: '/rangeBuild/project/getInnerOnePackProjectId',
    method: 'get'
  })
}

export function getCompsByLogIds(data) {
  return request({
    url: '/rangeBuild/project/getCompsByLogIds',
    method: 'get',
    params: data
  })
}

export function getBuildLogById(data) {
  return request({
    url: '/rangeBuild/project/getBuildLogById',
    method: 'get',
    params: data
  })
}

export function getBuildPushRemoteProgress(data) {
  return request({
    url: '/rangeBuild/project/getBuildPushRemoteProgress',
    method: 'get',
    params: data
  })
}

export function getRealBuildCompLog(data) {
  return request({
    url: '/rangeBuild/project/getRealBuildCompLog',
    method: 'get',
    params: data
  })
}

export function removeRealBuildLog(data) {
  return request({
    url: '/rangeBuild/project/removeRealBuildLog',
    method: 'post',
    params: data
  })
}

export function removePushRemoteProgress(data) {
  return request({
    url: '/rangeBuild/project/removePushRemoteProgress',
    method: 'post',
    params: data
  })
}
